<template>
    <div id="app">
        <el-row class="tac" :gutter="10">
            <el-col :span="8">
                <el-menu default-active="2" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" theme="dark" :router="true">
                    <el-submenu index="1">
                        <template slot="title"><i class="el-icon-message"></i>待办管理</template>
                        <el-menu-item-group>
                            <el-menu-item index="1-1" :route="{path:'/home'}">
                                我的代办
                            </el-menu-item>
                            <el-menu-item index="1-2"  :route="{path:'/student'}">
                                學生管理
                            </el-menu-item>
                        </el-menu-item-group>
                    </el-submenu>
                    <el-menu-item index="2"><i class="el-icon-menu"></i>导航二</el-menu-item>
                    <el-menu-item index="3"><i class="el-icon-setting"></i>导航三</el-menu-item>
                </el-menu>
            </el-col>
            <el-col :span="16" >
                <router-view> </router-view>
            </el-col>
        </el-row>
    </div>
</template>
<script>
export default {
    name: 'app',
    data() {
        return {
            activeIndex: '1',
            activeIndex2: '1'
        };
    },
    methods: {
        handleOpen(key, keyPath) {
            console.log(key, keyPath);
        },
        handleClose(key, keyPath) {
            console.log(key, keyPath);
        }
    }
}
</script>
<style scoped lang="less">
</style>
